package com.nbsaas.boot.student.rest.convert;

import com.nbsaas.boot.student.data.entity.Student;
import com.nbsaas.boot.student.api.domain.request.StudentDataRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 请求对象转换成实体对象
*/

public class StudentEntityConvert  implements Converter<Student, StudentDataRequest> {

    @Override
    public Student convert(StudentDataRequest source) {
        Student result = new Student();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

